Skip to content

feat: add filtersBar component - #1158

Merged
siiick merged 7 commits into
mainfrom
feat/ds-filtersbar2
Oct 10, 2025
Merged

feat: add filtersBar component#1158
siiick merged 7 commits into
mainfrom
feat/ds-filtersbar2

Conversation

@siiick

@siiick siiick commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

New filter bar component.

This is a first iteration that aims for a quick integration in the new Analytics page.

  • Support both base and additional filters.

  • Translations are injected from the client app.

  • Fully typed filter descriptors and updates events API.

  • Translations keys are to be defined, we need to discuss on this @ChibiBlasphem

image

Comment thread packages/ui-design-system/src/FiltersBar/types.ts
isActive: (name: string) => boolean;
}

export const FiltersBarContext = createContext<FiltersBarContextValue | null>(null);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you use createSimpleContext from @marble/shared ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I saw import { createSimpleContext } from '@app-builder/utils/create-context' only and wasn't aware we have the same in shared package

Comment on lines +13 to +18
export function useFiltersBarContext(): FiltersBarContextValue {
const ctx = FiltersBarContext.useValue();
if (ctx) return ctx;

throw new Error('useFiltersBarContext must be used within FiltersBar');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useValue already throw when no ctx exist

@siiick
siiick force-pushed the feat/ds-filtersbar2 branch from eef0bd0 to 205b29a Compare October 10, 2025 12:31

@ChibiBlasphem ChibiBlasphem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@siiick
siiick force-pushed the feat/ds-filtersbar2 branch from e6a0d7c to a2371a9 Compare October 10, 2025 15:25
@siiick
siiick enabled auto-merge (squash) October 10, 2025 15:25
@siiick
siiick merged commit 614b0f8 into main Oct 10, 2025
4 of 5 checks passed
@siiick
siiick deleted the feat/ds-filtersbar2 branch October 10, 2025 15:26
@sentry

sentry Bot commented Oct 14, 2025

Copy link
Copy Markdown

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants